$(function () {
    initTable();
});

function initTable(){
    $("#datagrid").bootstrapTable({
        columns: [
        {
          field: '',
          title: 'Sort No.',
          formatter: function (value, row, index) {
              return index + 1;
          }
        },
        {
            field: 'name',
            title: '名称'
        },
        {
            field: 'age',
            title: 'age'
        }
        ],
        data :[{"name":"ss","age":12},{"name":"ss","age":12}]
    });
}
